import request from '@/utils/request'

const api_name = '/act/processDefinition'

export default {

  // 列表
  getPageList(pageNum, pageSize, obj) {
    return request({
      url: `${api_name}/getDefinitions/${pageNum}/${pageSize}`,
      method: 'get',
      params: obj
    })
  },

  // 启动实例
  startProcess(obj) {
    return request({
      url: `${api_name}/startProcess/`,
      method: 'post',
      data: obj
    })
  },

  delDefinition(depID, pdID) {
    return request({
      url: `${api_name}/delDefinition/${depID}/${pdID}`,
      method: 'get'
    })
  }

}
